﻿using System;
using System.Collections.Generic;

using System.Text;

namespace System.Qizx.Xml
{
    /*******************************/
    /// <summary>
    /// This interface will manage the Content events of a XML document.
    /// </summary>
    public interface XmlSaxContentHandler
    {
        /// <summary>
        /// This method manage the notification when Characters elements were found.
        /// </summary>
        /// <param name="ch">The array with the characters found.</param>
        /// <param name="start">The index of the first position of the characters found.</param>
        /// <param name="length">Specify how many characters must be read from the array.</param>
        void characters(char[] ch, int start, int length);

        /// <summary>
        /// This method manage the notification when the end document node were found.
        /// </summary>
        void endDocument();

        /// <summary>
        /// This method manage the notification when the end element node was found.
        /// </summary>
        /// <param name="namespaceURI">The namespace URI of the element.</param>
        /// <param name="localName">The local name of the element.</param>
        /// <param name="qName">The long (qualified) name of the element.</param>
        void endElement(string namespaceURI, string localName, string qName);

        /// <summary>
        /// This method manage the event when an area of expecific URI prefix was ended.
        /// </summary>
        /// <param name="prefix">The prefix that ends.</param>
        void endPrefixMapping(string prefix);

        /// <summary>
        /// This method manage the event when a ignorable whitespace node was found.
        /// </summary>
        /// <param name="Ch">The array with the ignorable whitespaces.</param>
        /// <param name="Start">The index in the array with the ignorable whitespace.</param>
        /// <param name="Length">The length of the whitespaces.</param>
        void ignorableWhitespace(char[] Ch, int Start, int Length);

        /// <summary>
        /// This method manage the event when a processing instruction was found.
        /// </summary>
        /// <param name="target">The processing instruction target.</param>
        /// <param name="data">The processing instruction data.</param>
        void processingInstruction(string target, string data);

        /// <summary>
        /// This method is not supported, it is included for compatibility.
        /// </summary>
        void setDocumentLocator(XmlSaxLocator locator);

        /// <summary>
        /// This method manage the event when a skipped entity was found.
        /// </summary>
        /// <param name="name">The name of the skipped entity.</param>
        void skippedEntity(string name);

        /// <summary>
        /// This method manage the event when a start document node was found.
        /// </summary>
        void startDocument();

        /// <summary>
        /// This method manage the event when a start element node was found.
        /// </summary>
        /// <param name="namespaceURI">The namespace uri of the element tag.</param>
        /// <param name="localName">The local name of the element.</param>
        /// <param name="qName">The long (qualified) name of the element.</param>
        /// <param name="atts">The list of attributes of the element.</param>
        void startElement(string namespaceURI, string localName, string qName, SaxAttributesSupport atts);

        /// <summary>
        /// This methods indicates the start of a prefix area in the XML document.
        /// </summary>
        /// <param name="prefix">The prefix of the area.</param>
        /// <param name="uri">The namespace URI of the prefix area.</param>
        void startPrefixMapping(string prefix, string uri);
    }
}
